<?php if(!empty($datahash['queryResult'])){ ?>
<h2>検索結果</h2>
<div class="content-primary">
<ul data-role="listview">
<?php foreach( $datahash['queryResult'] as $school ){ ?>
		<li data-role="list-divider"><?php echo $school['School']['name']; ?></li>
		<?php 
			foreach( $school{'Campus'} as $campus ){
				$temp = empty($campus['name']) ?  $campus['addr'] : $campus['name'];
				echo "<li>".$html->link($temp,array('controller' => 'users', 'action' => 'setting/'.$campus['id']),array('data-ajax' => 'false'))."</li>";
			}
		?>
<?php } ?>
</ul>
</div><!--/content-primary -->		
<?php } ?>
<?php
echo $form->create('School', array('action' => 'search_dialog','data-rel' => "dialog"));
?>
<div data-role="fieldcontain">
<?php
echo $form->label('query','検索文字',array('for' => 'name', 'class'=>'ui-hidden-accessible'));
echo $form->input('query',array('placeholder' => "例:早稲田　ワセダ",'label' => false, 'div' => false));
?>
</div>
<div data-role="fieldcontain">
<?php
echo $form->end('検索');
?>
</div>
